package Student;

public class Student {
    private int no;
    private String name;
    private String profession;
    private String gender;
    private int age;
    private String interest;
    private String telephone;
    private String qq;
    private String address;

    private int math;
    private int english;
    private int java;
    private int datastruct;
    private int database;
    private int net;
    private int algorithm;
    private int os;


    public int getNo() {
        return no;
    }
    public void setNo(int no) {
        this.no = no;
    }
    public String getInterest() {
        return interest;
    }
    public void setInterest(String interest) {
        this.interest = interest;
    }
    public String getTelephone() {
        return telephone;
    }
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    public String getQq() {
        return qq;
    }
    public void setQq(String qq) {
        this.qq = qq;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public int getDatastruct() {
        return datastruct;
    }
    public void setDatastruct(int datastruct) {
        this.datastruct = datastruct;
    }
    public int getDatabase() {
        return database;
    }
    public void setDatabase(int database) {
        this.database = database;
    }
    public int getNet() {
        return net;
    }
    public void setNet(int net) {
        this.net = net;
    }
    public int getAlgorithm() {
        return algorithm;
    }
    public void setAlgorithm(int algorithm) {
        this.algorithm = algorithm;
    }
    public Student(){
    }
    public Student(int id, String name, String profession, String gender){
        this.no = id;
        this.name = name;
        this.profession = profession;
        this.gender = gender;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getProfession() {
        return profession;
    }
    public void setProfession(String profession) {
        this.profession = profession;
    }
    public String getGender() {
        return gender;
    }
    public void setGender(String gender) {
        this.gender = gender;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getMath() {
        return math;
    }
    public void setMath(int math) {
        this.math = math;
    }
    public int getEnglish() {
        return english;
    }
    public void setEnglish(int english) {
        this.english = english;
    }
    public int getJava() {
        return java;
    }
    public void setJava(int java) {
        this.java = java;
    }
    public int getOs() {
        return os;
    }
    public void setOs(int os) {
        this.os = os;
    }

    public int getSumScore() {
        int sum = (math < 0 ? 0 : math)
                + (english < 0 ? 0 : english)
                + (java < 0 ? 0 : java)
                + (datastruct < 0 ? 0 : datastruct)
                + (database < 0 ? 0 : database)
                + (net < 0 ? 0 : net)
                + (algorithm < 0 ? 0 : algorithm)
                + (os < 0 ? 0 : os);
        return sum;
    }





}
